<!--
-->
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=GBK">
	
	<title>Test RMsgBox Components</title>
	
	<script language=javascript src="../../prototype.js"></script>
	<script language=javascript src="../../RBasic.js"></script>
	<!--script language=javascript src="../RMsgBoxes.js"></script-->

	<link href="../../../theme/1/Desktop.css" type="text/css" rel=stylesheet>
	
</head>
<body style="margin:5px">

<div id="div">
<input type=button class=small_button onclick="showWindow();" value="MsgBox">
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button1>
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button2>
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button3>
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button4>
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button5>
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button6>
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button7>
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button8>
<input type=button class=small_button onclick="showWindow();" value="MsgBox" ID=Button9>
</div>
<br>
opener:<script>document.write(window.opener)</script><br>
parent:<script>document.write(window.parent == window)</script><br>
dialogArguments:<script>document.write(window.dialogArguments)</script><br>
text:<script>document.write(window.dialogArguments != undefined ? window.dialogArguments.window.document.URL : "")</script><br>
<input type=button class=small_button onclick="draw2();" value="MsgBox"><br>

</body>

<script>

var str = "this is a string.";

function showWindow() {
/*	var url = "javascript: document.write('<script>');";
	url += "document.write('function load() {document.write(document.URL);}');";
	url += "document.write('setTimeout(\"load()\", 0)');";
	url += "document.write('<\/script>');"; */
//	var url = "javascript: window.parent.draw(window.document);";
	var url = "Test_MsgBox.htm";
	var obj = new Object();
	obj.window = window;
	obj.func = draw;
	window.showModalDialog(url, obj, "dialogHeight: 200px");
}

function draw(doc) {
	$("Button1").value += ".";
}

function draw2() {
	window.dialogArguments.func(document);
}

window.onerror = draw;

</script>

</html>